package com.qiguliuxing.dts.common.type;

import lombok.Getter;

/**
 * 退款类型的枚举类
 * 
 * @author qiguliuxing
 * @QQ 623659388
 * @since 1.0.0
 */
@Getter
public enum RefundTypeEnum {

	// 申请退款
	REFUND_APPLY((byte) 0, "申请退款"),

	// 退款申请通过
	APPROVE_OK((byte) 1, "退款申请通过"),

	//退款申请拒绝
	APPROVE_REJECT((byte) 2, "退款申请拒绝"),

	// 退款申请完成
	APPROVE_FINISH((byte) 3, "退款申请完成");

	private Byte status;
	private String desc;

	RefundTypeEnum(Byte status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public static RefundTypeEnum getInstance(Byte status2) {
		if (status2 != null) {
			for (RefundTypeEnum tmp : RefundTypeEnum.values()) {
				if (tmp.status.intValue() == status2.intValue()) {
					return tmp;
				}
			}
		}
		return null;
	}
}
